<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2020/7/7
 * Time: 15:46
 */

namespace app\share\model;


use think\Model;

class Store extends Model
{
    public function goodsInfo($id)
    {
        $data = Store::field("goods_id,sku_id,number,price")->find($id)->toArray();
        return $data;
    }
    public function getNumber($id)
    {
        $data = Store::where('id',$id)->value('number');
        return $data;
    }
    public function updateNumber($id)
    {
        $data = Store::where('id',$id)->dec("number")->update();
        return $data;
    }

}